<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>乐淘管理系统-用户管理</title>
  <link rel="stylesheet" href="lib/bootstrap/css/bootstrap.css">
  <!-- 引入 bootstrap-validator 的样式, 由于基于 bootstrap 所以放在下面引入 -->
  <link rel="stylesheet" href="lib/bootstrap-validator/css/bootstrapValidator.css">
  <!-- 进度条 css -->
  <link rel="stylesheet" href="lib/nprogress/nprogress.css">
  <!-- 我们自己的 common.css -->
  <link rel="stylesheet" href="css/common.css">
</head>
<body>


<!-- 左边的菜单栏 -->
<div class="lt_aside">
  <!-- 大标题 -->
  <div class="brand">
    <a href="javascript:;">全栈1期</a>
  </div>
  <!-- 用户头像 -->
  <div class="user">
    <img src="images/default.png" alt="">
    <p class="user_info">超级管理员</p>
  </div>
  <!-- 导航菜单 -->
  <div class="nav">
    <ul>
      <li>
        <a href="user.html" class="now">
          <span class="glyphicon glyphicon-user"></span>
          用户管理
        </a>
      </li>
      <li>
        <a href="javascript:;" class="classify">
          <span class="glyphicon glyphicon-list"></span>
          分类管理
        </a>
        <div class="child" style="display: none;">
          <a href="first.html">一级分类</a>
          <a href="second.html">二级分类</a>
        </div>
      </li>
      <li>
        <a href="product.html">
          <span class="glyphicon glyphicon-tags"></span>
          商品管理
        </a>
      </li>
    </ul>
  </div>
</div>

<!-- 主体区域 -->
<div class="lt_main">
  <!-- topbar 区域 -->
  <div class="lt_topbar">
    <a href="javascript:;" class="pull-left icon_menu"><span class="glyphicon glyphicon-align-justify"></span></a>
    <a href="javascript:;" class="pull-right icon_logout"><span class="glyphicon glyphicon-log-out"></span></a>
  </div>
  
  
  <div class="container-fluid">
    
    <!-- 面包屑导航 -->
    <ol class="breadcrumb">
      <li><a href="index.html">管理系统</a></li>
      <li class="active">用户管理</li>
    </ol>
  
    
    <!-- 内容区域 -->
    <div class="lt_content">
      <!-- 表格 -->
      <table class="table table-bordered table-hover">
        <thead>
          <tr>
            <th>序号</th>
            <th>用户名</th>
            <th>手机号</th>
            <th>状态</th>
            <th>操作</th>
          </tr>
        </thead>
        <tbody>
        
        </tbody>
      </table>
  
  
      <!-- 分页 -->
      <div class="text-right">
        <!-- 3.X分页的必须使用ul元素  -->
        <ul id="paginator"></ul>
      </div>
    </div>
    
  </div>
  
</div>

<div class="modal fade" id="statusModal">
  <div class="modal-dialog modal-sm">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"><span>&times;</span></button>
        <h4 class="modal-title">温馨提示</h4>
      </div>
      <div class="modal-body">
        <p><span class="glyphicon glyphicon-info-sign"></span>  你确定要执行此操作么 ?</p>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
        <button type="button" class="btn btn-primary btn_confirm">确定</button>
      </div>
    </div>
  </div>
</div>




<!-- role aria-labelledby 给盲人阅读器使用的
     data-dismiss="modal" 点击关闭当前弹框
-->
<!-- 退出模态框 -->
<div class="modal fade" id="logoutModal">
  <div class="modal-dialog modal-sm">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"><span>&times;</span></button>
        <h4 class="modal-title">温馨提示</h4>
      </div>
      <div class="modal-body">
        <p><span class="glyphicon glyphicon-info-sign"></span> 你确定要退出管理系统么?</p>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
        <button type="button" class="btn btn-primary btn_logout">退出</button>
      </div>
    </div>
  </div>
</div>


<script type="text/html" id="table_tpl">
  {{ each rows v i }}
  <tr>
    <td>{{ (page-1) * size  + (i+1) }}</td>
    <td>{{ v.username }}</td>
    <td>{{ v.mobile }}</td>
    <td>{{ v.isDelete === 1 ? '已启用' : '已禁用'}}</td>
    <!-- isDelete如果是1表示用户是可以用， 如果是0表示用户是禁用的。 -->
    {{ if v.isDelete === 0 }}
      <td><button data-id="{{ v.id }}" class="btn btn-success btn-sm btn_isDelete">启用</button></td>
    {{ /if }}
    
    {{ if v.isDelete === 1 }}
      <td><button data-id="{{ v.id }}" class="btn btn-danger btn-sm btn_isDelete">禁用</button></td>
    {{ /if }}
  </tr>
  {{ /each }}
</script>




<script src="lib/jquery/jquery.min.js"></script>
<script src="lib/bootstrap/js/bootstrap.js"></script>
<script src="lib/bootstrap-validator/js/bootstrapValidator.js"></script>
<!-- paginator 插件 -->
<script src="lib/bootstrap-paginator/bootstrap-paginator.js"></script>
<script src="lib/nprogress/nprogress.js"></script>
<script src="lib/artTemplate/template-web.js"></script>
<script src="js/common.js"></script>
<script src="js/user.js"></script>

</body>
</html>